package pkg

import (
	"fmt"
	"github.com/Baidu-AIP/golang-sdk/aip/censor"
	"short_video/config"
)

//type ClientType struct {
//	ConclusionType int `json:"conclusionType"`
//}

func GetCensor(message string) bool {
	client := censor.NewCloudClient(config.AppConf.AccessKeyID, config.AppConf.AccessKeySecret)
	//如果是百度云ak sk,使用下面的客户端
	//client = censor.NewCloudClient("ak", "sk")
	res := client.TextCensor("大傻子")
	fmt.Println(res)

	if res == message {
		return true
	}
	return false
}
